﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Portal.Models;
using System.Configuration;
using Portal.Properties;

namespace MvcApplication2.Controllers
{
    public partial class CmsController : Controller
    {
        /// <summary>
        /// CMS database's entity model
        /// </summary>
        protected CmsDB DB = new CmsDB();
        
        /// <summary>
        /// Sets page's title, keywords and meta description.
        /// </summary>
        /// <param name="title"></param>
        /// <param name="keyword"></param>
        /// <param name="description"></param>
        protected void setHeader(string title="", string keyword="", string description="")
        {
            
            ViewBag.Title = string.IsNullOrEmpty(title) ? Settings.Default.SiteName : Settings.Default.SiteName + " | " + title;
            ViewBag.Description = description;
            ViewBag.Keywords = keyword;
        }

    }
}
